home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 February / 1986-02.d64 / demo 1_vic (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  51 lines

  1. 99 ifa=0thena=1:load"vblinkobj",8,1
  2. 100 poke56,28:poke55,0:clr
  3. 110 v1=1:v2=2:co=646:hi=28
  4. 130 pokev1,0:pokev2,hi
  5. 140 rem ** usr() is at $c000, $3c00 on the +4/16, $1c00 for vic **
  6. 150 sd=16384: rem ** set delay flag
  7. 160 db=8192 : rem ** disable blink
  8. 170 eb=4096 : rem ** enable blink
  9. 180 sb=2048 : rem ** stop color from blinking
  10. 190 mb=1024 : rem ** make color start blinking
  11. 200 vb=512  : rem ** return value of blinking color
  12. 210 rc=256  : rem ** reset all colors-no blinking
  13. 220 rem *** now we demonstrate blink
  14. 230 rd$="[221][144]**** red ****[221]":gr$="[221][144]*** green ***[221]":print"[147]"
  15. 240 poke36879,8
  16. 270 x=usr(eb):if x=0 then530: rem ** enable blinkmode
  17. 280 c$=rd$
  18. 290 gosub450
  19. 300 x=usr(mb+(16*2)+0):rem ** black blinks to red
  20. 310 x=usr(mb+(16*3)+1):rem * white blinks to cyan
  21. 320 x=usr(mb+(16*7)+4):rem ** make purple blink to yellow
  22. 330 x=usr(sd+14): rem ** set blink speed
  23. 340 print:print"[156]   *** warning *** "
  24. 350 print:print"hit a key to change"
  25. 360 gosub530
  26. 370 x=usr(sb+0):rem **  stop black from blinking to red
  27. 380 x=usr(vb+0):if x<>0 then380:rem ** wait until black reset
  28. 390 x=usr(mb+(16*5)+0):rem ** now blink black to green
  29. 400 c$=gr$:gosub450
  30. 410 gosub530
  31. 420 x=usr(sb+0):rem **  stop black from blinking to green
  32. 430 x=usr(vb+0):if x<>0 then430:rem ** wait until black reset
  33. 440 goto280
  34. 450 print"attention - attention":print
  35. 460 print"[144]   condition  code "
  36. 470 print"   [213][192][192][192][192][192][192][192][192][192][192][192][192][192][201] "
  37. 480 print"   [221]             [221] "
  38. 490 print"   "c$
  39. 500 print"   [221]             [221] "
  40. 510 print"   [202][192][192][192][192][192][192][192][192][192][192][192][192][192][203] "
  41. 520 return
  42. 530 tx=10:ty=20
  43. 540 get a$:ty=ty-1:if ty<0 then ty=20:x=usr(sd+tx):tx=tx-1:if tx=0 then tx=1
  44. 550 ct$=" ":if tx/2=int(tx/2)then ct$="[209]"
  45. 560 print""
  46. 570 x=usr(vb+0):rem ** now find the color black is blinking to
  47. 580 pokeco,x:rem ** change current character color to blinking color
  48. 590 printtab(ty);ct$;
  49. 600 if a$="" then540
  50. 610 x=usr(sd+14):return
  51.